#include "bitmaps.h"

ALLEGRO_BITMAP *Bitmaps::get_default_bitmap(Movable_type type)
{
	const ALLEGRO_COLOR BACKGROUND = al_color_name("black");
	ALLEGRO_BITMAP *this_bitmap = al_create_bitmap(50,50);
	al_set_target_bitmap(this_bitmap);
	al_clear_to_color(al_map_rgb(0,0,0));

	switch(type)
	{
	case DIGDUG:	
				al_clear_to_color(BACKGROUND);
				//Body
				al_draw_filled_circle(25,25,20,al_map_rgb(0,255,0));
				//Face
				al_draw_filled_triangle(10,10,10,40,40,25, al_map_rgb(255,0,255));

				break;
	case MONSTER:	
		
				al_clear_to_color(BACKGROUND);
				//Body
				al_draw_filled_circle(25,25,20,al_map_rgb(255,0,0));
					
				break;
	case SAND:		
				al_clear_to_color(al_map_rgb(255,222,173));
				al_draw_filled_rectangle(10,10,40,40,al_map_rgb(139,119,101));
				break;

	case PROJECTILE: 
				al_clear_to_color(BACKGROUND);
				al_draw_line(0,25,5,0,YELLOW, 2);
				al_draw_line(5,0,10,50,YELLOW, 2);
				al_draw_line(10,50,15,0,YELLOW, 2);
				al_draw_line(15,0,20,50,YELLOW, 2);
				al_draw_line(20,50,25,0,YELLOW, 2);
				al_draw_line(25,0,30,50,YELLOW, 2);

				al_draw_line(30,50,35,0,YELLOW, 2);
				al_draw_line(35,0,40,25,YELLOW, 2);
				al_draw_line(40,25,45,25,RED,2);
				al_draw_filled_triangle(45,10,45,40,50,25, RED);

				al_draw_line(30,50,35,0,YELLOW, 2);
				al_draw_line(35,0,40,25,YELLOW, 2);
				al_draw_line(40,25,45,25, RED, 3);
				al_draw_filled_triangle(44,10,50,25,44,40, RED);
				break;

	} 

	return this_bitmap;
}
